import axios from 'axios'
const _fetch = axios.create({
  baseURL: process.env.VUE_APP_BASE_API,
  timeout: 5000
})
// 请求拦截器
_fetch.interceptors.request.use(
  config => {
    return config
  },
  error => {
    return Promise.reject(new Error(error))
  }
)
// 响应拦截器
_fetch.interceptors.response.use(
  response => {
    return response
  },
  error => {
    return Promise.reject(new Error(error))
  }
)
export default _fetch
